<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--模板-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark" th:fragment="top-header">
    <a class="navbar-brand" href="/">信华信Card</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item"> <a class="nav-link" href="/aboutUs">介绍<span class="sr-only"></span></a> </li>
            <li class="nav-item"> <a class="nav-link" href="/question">问题</a> </li>
            <li class="nav-item"> <a class="nav-link" href="/login" id="isLogin">登录</a> </li>
        </ul>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="js/jquery-3.2.1.min.js"></script>
    <script th:inline="javascript">
        if([[${session.card_system_user_id}]]){
            $("#isLogin").attr('href',"/userInfo");
            document.getElementById("isLogin").innerText = "个人信息";
        }
    </script>
</nav>
</body>
</html>